/* Ejercicio 5.17
   ejer5_17.c */
#include <stdio.h>

/* Prototypes */
int multiple( int number1, int number2 );

/* function main begins program execution */
int main( void )
{
    int a, b;

    printf( "Enter a number: " );
    scanf( "%d", &a );
    printf( "Enter another number: " );
    scanf( "%d", &b );

    if ( multiple( a, b ) ) {
        printf( "%d is a multiple of %d\n", b, a );
    }
    else {
        printf( "%d isn't a multiple of %d\n", b, a );
    }

	return 0;
} /* end function main */

/* Determines if a number is a multiple of another one */
int multiple( int number1, int number2 )
{
    return number2 % number1 == 0;
}
